<?php
session_start();
include "Includes/solotrn_sesion.php";
include "Includes/soloFun_Generales.php";

require_once "config.php";

SoloFun_ExecSql ("select * from solotb_nodos", $SoloArrNodos);
$StrCboNodo = SoloFun_CargaCombo($SoloArrNodos,"CboNodos","$CboDisabled",$itemselec," class='SoloStyle_Texto' style='width:200'","");

$Opcion = $_REQUEST["Opcion"];
$oConexion = new Conexion($WORKFLOW["motor_base"], $WORKFLOW["db_usuario"], $WORKFLOW["db_password"], 
        $WORKFLOW["basedatos"], $WORKFLOW["servidor"], $WORKFLOW["flags"], $WORKFLOW["encoding"]);

if ($_REQUEST["Opcion"] == "1" || $_REQUEST["Opcion"] == "2") {
    $soloSQL = "select * from solotb_usuario_infoadic where nu_usua= {$_REQUEST["txtCodigo"]}";
//'response.write SoloSQL
    if(!$oConexion->EjecutarQuery($soloSQL)) {
        echo $oConexion->getErrorMessage();
        return;
    }else {
        $arrAdicional = $oConexion->getData("NUM");
        if (is_array($arrAdicional) && count($arrAdicional) > 0) {
            $SoloPerfil = $arrAdicional[0][2];
            $SoloMail = $arrAdicional[0][6];
            $SoloFono = $arrAdicional[0][7];
            $SoloExtension = $arrAdicional[0][8];
            $SoloCelular = $arrAdicional[0][9];
            $oConexion->liberarResultado();
        }else
            $Opcion = "3";
    }
    $oConexion->Cerrar();

}

$pageaction = "solotrn_GrabarUsuarioInfoAdicional.php?Opcion=$Opcion";
?>
<html>
    <head>
        <title>SIMIES - TRAMITES - Informaci&oacute;n Adicional</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <link rel="stylesheet" href="SoloStyles/Solostyles.css" type="text/css">
        <SCRIPT type="text/JavaScript" src="Includes/Solofun_generales.js"></SCRIPT>
        <SCRIPT type="text/JavaScript" src="PHPMailer/fun_generales.js"></SCRIPT>
    </head>

    <body topmargin=0 leftmargin=0 onkeydown="checkKey();">
        <table cellpadding="0" cellspacing="0" style="width: 90%">
            <tr>
                <td><img src="templates/SoloTemplate_LogoCabecera.png" style="height: 50px" alt=""/></td>
                <td style="text-align:center" class="SoloStyle_TituloPaginas">Informaci&oacute;n Adicional de Usuario</td>
            </tr>
        </table>
        <form name="frm" action="<?php echo $pageaction; ?>" method="POST">
            <input type="hidden" name="txtform" class="texto" size="10">
            <input name="txtCodigo" type="hidden" class="SoloStyle_Texto" size="50" maxlength="50" readonly value="<?php echo $_REQUEST["txtCodigo"];?>"/>
            <table border="0" width="80%" align="center" cellpadding="2" cellspacing="1" bordercolor="#CCCCCC">
                <tr>
                    <td> <img src="iconos/soloico_grabar.gif" border="1" alt="Grabar Usuario" style="cursor:hand" onClick="SoloFun_Submit(document.frm);">
                        <img src="iconos/soloico_salir.gif" border="1" alt="Regresar" style="cursor:hand" onClick="window.opener.location.reload(); window.close();" >
                    </td>
            </table>
            <table border="0" width="80%" align="center" cellpadding="2" cellspacing="1">
                <tr>
                    <td class="SoloStyle_Etiqueta"><b>Nodo</b></td>
                    <td class="SoloStyle_EtiquetaCajas"> <?php echo $StrCboNodo; ?> </td>
                </tr>
                <tr>
                    <td class="SoloStyle_Etiqueta"><b>Nombre</b></td>
                    <td  class="SoloStyle_EtiquetaCajas" > 
                        <input name="TxtNombre" type="text" class="SoloStyle_Texto" size="50" maxlength="50" readonly value="<?php echo Str2ProperCase($_REQUEST["txtNombre"]);?>">
                    </td>
                </tr>
                <tr>
                    <td class="SoloStyle_Etiqueta">Mail</td>
                    <td class="SoloStyle_EtiquetaCajas"> <input type="text" maxlenght="150" size="50" name="mail" class="SoloStyle_Texto" value="<?php echo $SoloMail;?>"></td>
                </tr>
                <tr>
                    <td class="SoloStyle_Etiqueta">Extensi&oacute;n</td>
                    <td class="SoloStyle_EtiquetaCajas"> <input type="text" maxlenght="50" size="50" name="extension" class="SoloStyle_Texto" value="<?php echo $SoloExtension;?>"></td>
                </tr>
                <tr>
                    <td class="SoloStyle_Etiqueta">Celular</td>
                    <td class="SoloStyle_EtiquetaCajas"> <input type="text" maxlenght="50" size="50" name="celular" class="SoloStyle_Texto" value="<?php echo $SoloCelular;?>"></td>
                </tr>
            </table>
            <br>
        </form>
    </body>
</html>
<?php
include "Includes/soloFun_ShowMessages.php";
?>